package com.xbongbong.pro.enums.menu.enums;

import com.xbongbong.paas.enums.PlatFormEnum;
import com.xbongbong.saas.enums.XbbRefTypeEnum;
import lombok.Getter;

import java.util.Objects;

/**
 * @author 吴峰
 * @version v1.0
 * @date 2019/5/16 9:51
 * @since v1.0
 */
@Getter
public enum NoHasQuickMenuEnum {

    /**
     *  无新建的模块
     */
    SIMULATED_PRODUCTION(XbbRefTypeEnum.SIMULATED_PRODUCTION.getAlias(), PlatFormEnum.ALL.getValue()),
    STOCK_SEARCH(XbbRefTypeEnum.STOCK_SEARCH.getAlias(), PlatFormEnum.ALL.getValue()),
    STOCK_STANDING_BOOK(XbbRefTypeEnum.STOCK_STANDING_BOOK.getAlias(), PlatFormEnum.ALL.getValue()),
    STOCK_FLOW_BILL(XbbRefTypeEnum.STOCK_FLOW_BILL.getAlias(), PlatFormEnum.ALL.getValue()),
    BATCH_FLOW_BILL(XbbRefTypeEnum.BATCH_FLOW_BILL.getAlias(), PlatFormEnum.ALL.getValue()),
    SEQ_SEARCH(XbbRefTypeEnum.SEQ_SEARCH.getAlias(), PlatFormEnum.ALL.getValue()),
    /**
     * dingtalk无新建的模块
     */
    CUSTOMER_DUPLICATE(XbbRefTypeEnum.CUSTOMER_DUPLICATE.getAlias(), PlatFormEnum.DINGTALK.getValue()),
    PRODUCT(XbbRefTypeEnum.PRODUCT.getAlias(), PlatFormEnum.DINGTALK.getValue()),

    CUSTOMER_STATEMENT(XbbRefTypeEnum.CUSTOMER_STATEMENT.getAlias(),PlatFormEnum.ALL.getValue()),
    CUSTOMER_STATEMENT_STATISTIC(XbbRefTypeEnum.CUSTOMER_STATEMENT_STATISTIC.getAlias(),PlatFormEnum.ALL.getValue()),

    //支付流水
    ONLINE_PAYMENT_FLOW(XbbRefTypeEnum.ONLINE_PAYMENT_FLOW.getAlias(), PlatFormEnum.ALL.getValue()),

    WORK_ORDER_V2_POOL(XbbRefTypeEnum.WORK_ORDER_V2_POOL.getAlias(), PlatFormEnum.ALL.getValue()),

    WORK_ORDER_V2_APPOINT(XbbRefTypeEnum.WORK_ORDER_V2_APPOINT.getAlias(), PlatFormEnum.ALL.getValue()),


    RECEIPT_ORDER(XbbRefTypeEnum.RECEIPT_ORDER.getAlias(), PlatFormEnum.ALL.getValue()),
    SLA_LOG(XbbRefTypeEnum.SLA_LOG.getAlias(), PlatFormEnum.ALL.getValue()),

    NONE(null, null);

    private String alias;

    private String platform;

    NoHasQuickMenuEnum(String alias, String platform) {
        this.alias = alias;
        this.platform = platform;
    }

    public static NoHasQuickMenuEnum getByAlias(String alias) {
        for (NoHasQuickMenuEnum noHasQuickMenuEnum: values()) {
            if (Objects.equals(noHasQuickMenuEnum.getAlias(), alias)) {
                return noHasQuickMenuEnum;
            }
        }
        return NONE;
    }
}
